package cc.cix.hq.common.core.entity.org;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author cix
 */
@Data
@ApiModel(value = "JobLog对象", description = "定时任务")
@TableName("t_job_log")
public class JobLog implements Serializable {

    private static long serialVersionUID = -7114915445674333148L;

    /**
     * 任务执行成功
     */
    public static String JOB_SUCCESS = "0";
    /**
     * 任务执行失败
     */
    public static String JOB_FAIL = "1";

    @TableId(value = "ID", type = IdType.AUTO)
    @ApiModelProperty("调度日志ID")
    private Long id;

    @ApiModelProperty("定时任务 ID")
    private Long jobId;

    @ApiModelProperty("Bean名称")
    private String beanName;

    @ApiModelProperty("方法名称")
    private String methodName;

    @ApiModelProperty("方法参数")
    private String params;

    @ApiModelProperty("状态")
    private String status;

    @ApiModelProperty("异常信息")
    private String error;

    @ApiModelProperty("耗时（毫秒）")
    private Long times;

    @ApiModelProperty("执行时间")
    private LocalDateTime createTime;

}
